package com.fy.paper.controller;

import com.fy.core.vo.ApiRest;
import com.fy.paper.service.PaperService;
import com.fy.paper.vo.DtkVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 试卷 前端控制器
 * </p>
 *
 * @author hxd
 * @since 2023-06-20
 */
@RestController
@CrossOrigin
@RequestMapping("/paper")
public class PaperController {
    @Autowired
    private PaperService paperService;

    @GetMapping("create/{examId}")
    public ApiRest create(@PathVariable String examId){
        return paperService.create(examId);
    }

    @GetMapping("dtk/{parentId}")
    public ApiRest<DtkVo> dtk(@PathVariable String parentId){
        return paperService.dtk(parentId);
    }


}
